package com.zoro.dyformservice.support.threadutil;

import com.zoro.dyformservice.support.DyFormSystemProperties;
import org.springframework.context.annotation.Bean;

public class ThreadConfig {

    private final ThreadConfigProperties threadConfigProperties;

    public ThreadConfig(DyFormSystemProperties dyFormSystemProperties) {
        this.threadConfigProperties = dyFormSystemProperties.getThread();
    }

    @Bean
    public ThreadExecService threadExecService() {
        return new ThreadExecService(this.threadConfigProperties.getThreadSize());
    }
}
